home *** CD-ROM | disk | FTP | other *** search
- head 1.7;
- access;
- symbols
- RELEASE:1.7;
- locks; strict;
- comment @ * @;
-
-
- 1.7
- date 90.12.11.12.26.59; author paul; state Exp;
- branches;
- next 1.6;
-
- 1.6
- date 89.10.20.15.48.57; author paul; state Exp;
- branches;
- next 1.5;
-
- 1.5
- date 89.05.10.00.59.45; author paul; state Exp;
- branches;
- next 1.4;
-
- 1.4
- date 89.05.09.22.54.35; author paul; state Exp;
- branches;
- next 1.3;
-
- 1.3
- date 89.05.08.20.41.57; author paul; state Exp;
- branches;
- next 1.2;
-
- 1.2
- date 89.05.06.22.46.36; author paul; state Exp;
- branches;
- next 1.1;
-
- 1.1
- date 89.02.13.21.43.41; author paul; state Exp;
- branches;
- next ;
-
-
- desc
- @@
-
-
- 1.7
- log
- @Corrected handling of hyphenated names. Added WILDNAMES #define for more
- aggressive matching of full name lookups. See the comments in phquery.h.
- @
- text
- @/*
- * @@(#)$Header: /usr/local/src/mail/sendmail/uiuc/RCS/phquery.h,v 1.6 89/10/20 15:48:57 paul Exp Locker: paul $
- */
-
- /*
- * Configuration parameters.
- *
- * Defining EXPAND_TO will print the list of expanded addresses on an added
- * X-PH-To: header line. This will also expand names found in /usr/lib/aliases
- * lists. Leaving it undefined will cause phquery to print only a version
- * line with the name of the host running phquery, e.g.,
- * X-Ph: V3.5@@uxc.cso.uiuc.edu .
- */
- /*#define EXPAND_TO /* Print translated addresses */
-
- /*
- * An address tested as a name is first run through as is. If no matches
- * are found then any punctuation characters are converted one at a time
- * (leftmost first) to space characters and the lookup is repeated until
- * there are no more punctuation characters. If WILDNAMES is #define'd,
- * a wildcard char '*' will be appended after each single character name,
- * e.g. p-pomes is tried as "p* pomes". This has risks as follows: assume
- * Duncan Lawrie sets his alias to "lawrie". A query for d-lawrie will
- * fail as a alias lookup but succeed as a name lookup when written as
- * "d* lawrie". This works until Joe Student sets his alias to "d-lawrie".
- * Whoops. Still in a non-hostile environment, this function may be more
- * useful than dangerous.
- */
- /*#define WILDNAMES /* Append '*' to single char names */
-
- /* End of configurable parameters. */
-
- /*
- ** Reply codes:
- ** 1XX - status
- ** 2XX - information
- ** 3XX - additional information or action needed
- ** 4XX - temporary errors
- ** 5XX - permanent errors
- ** 6XX - phquery specific codes
- */
- #define LR_PROGRESS 100 /* in progress */
- #define LR_ECHO 101 /* echoing cmd */
-
- #define LR_OK 200 /* success */
- #define LR_RONLY 201 /* database ready in read only mode */
-
- #define LR_MORE 300 /* need more info */
- #define LR_LOGIN 301 /* encrypt this string */
-
- #define LR_TEMP 400 /* temporary error */
- #define LR_INTERNAL 401 /* database error, possibly temporary */
- #define LR_LOCK 402 /* lock not obtained within timeout period */
- #define LR_DOWN 475 /* database unavailable; try again later */
-
- #define LR_ERROR 500 /* hard error; general */
- #define LR_NOMATCH 501 /* no matches to query */
- #define LR_TOOMANY 502 /* too many matches to query */
- #define LR_AINFO 503 /* may not see that field */
- #define LR_ASEARCH 504 /* may not search on that field */
- #define LR_ACHANGE 505 /* may not change field */
- #define LR_NOTLOG 506 /* must be logged in */
- #define LR_FIELD 507 /* field unknown */
- #define LR_ABSENT 508 /* field not present in entry */
- #define LR_ALIAS 509 /* requested alias is already in use */
- #define LR_AENTRY 510 /* may not change entry */
- #define LR_ADD 511 /* may not add entries */
- #define LR_VALUE 512 /* illegal value */
- #define LR_OPTION 513 /* unknown option */
- #define LR_UNKNOWN 514 /* unknown command */
- #define LR_NOKEY 515 /* no indexed field found in query */
- #define LR_AUTH 516 /* no authorization for query */
- #define LR_READONLY 517 /* operation failed; database is read-only */
- #define LR_LIMIT 518 /* too many entries selected for change */
- #define LR_HISTORY 519 /* history substitution failed */
-
- #define LR_SYNTAX 599 /* syntax error */
-
- #define LR_AMBIGUOUS 600 /* ambiguous or multiple match */
-
- #define NONE_OF_ABOVE -1
-
- struct ReplyCodes {
- int key;
- char *value;
- } Codes[] = {
- LR_PROGRESS, "Nameserver search in progress",
- LR_ECHO, "Echoing nameserver cmd",
- LR_OK, "Success",
- LR_RONLY, "Nameserver database ready in read only mode",
- LR_MORE, "More info needed to process nameserver query",
- LR_LOGIN, "Encrypt this string",
- LR_TEMP, "Temporary nameserver error",
- LR_INTERNAL, "Nameserver database error, possibly temporary",
- LR_LOCK, "Nameserver lock not obtained within timeout period",
- LR_ERROR, "Nameserver hard error; general",
- LR_NOMATCH, "No matches to nameserver query",
- LR_TOOMANY, "Too many matches found to nameserver query",
- LR_AINFO, "May not see that nameserver field",
- LR_ASEARCH, "May not search on that nameserver field",
- LR_ACHANGE, "May not change that nameserver field",
- LR_NOTLOG, "Must be logged in to nameserver",
- LR_FIELD, "Unknown nameserver field",
- LR_ABSENT, "E-mail field not present in nameserver entry",
- LR_ALIAS, "Requested nameserver alias is already in use",
- LR_AENTRY, "May not change nameserver entry",
- LR_ADD, "May not add nameserver entries",
- LR_VALUE, "Illegal value",
- LR_OPTION, "Unknown nameserver option",
- LR_UNKNOWN, "Unknown nameserver command",
- LR_NOKEY, "No indexed field found in nameserver query",
- LR_AUTH, "No authorization for nameserver request",
- LR_READONLY, "Nameserver operation failed; database is read-only",
- LR_LIMIT, "Too many nameserver entries selected for change",
- LR_HISTORY, "History substitution failed",
- LR_SYNTAX, "Syntax error",
- LR_AMBIGUOUS, "Multiple matches found for nameserver query",
- NONE_OF_ABOVE, (char *)NULL
- };
-
- /*
- * Field types returned by QI. These must be sorted in lexographic order.
- */
- #define ADDRESS 0
- #define ALIAS 1
- #define ALL 2
- #define BIRTHDAY 3
- #define CALLSIGN 4
- #define CLASSCO 5
- #define CURRICULUM 6
- #define DEF_ACCOUNT 7
- #define DEPARTMENT 8
- #define EMAIL 9
- #define FAMILY 10
- #define HERO 11
- #define HOME_ADDRESS 12
- #define HOURS 13
- #define ID 14
- #define MAILCODE 15
- #define MAIL_ADDRESS 16
- #define NAME 17
- #define NICKNAME 18
- #define OFFICE_ADDRESS 19
- #define OTHER 20
- #define PAGER 21
- #define PASSWORD 22
- #define PERMANENT_ADDRESS 23
- #define PHONE 24
- #define PROJECT 25
- #define PROXY 26
- #define REVISIONS 27
- #define SOUND 28
- #define TITLE 29
- #define TYPE 30
-
- struct QI_fields {
- int key;
- char *value;
- } Fields[] = {
- ADDRESS, "address",
- ALIAS, "alias",
- ALL, "all",
- BIRTHDAY, "birthday",
- CALLSIGN, "callsign",
- CLASSCO, "classco",
- CURRICULUM, "curriculum",
- DEF_ACCOUNT, "def_account",
- DEPARTMENT, "department",
- EMAIL, "email",
- FAMILY, "family",
- HERO, "hero",
- HOME_ADDRESS, "home_address",
- HOURS, "hours",
- ID, "id",
- MAIL_ADDRESS, "mail_address",
- MAILCODE, "mailcode",
- NAME, "name",
- NICKNAME, "nickname",
- OFFICE_ADDRESS, "office_address",
- OTHER, "other",
- PAGER, "pager",
- PASSWORD, "password",
- PERMANENT_ADDRESS, "permanent_address",
- PHONE, "phone",
- PROJECT, "project",
- PROXY, "proxy",
- REVISIONS, "revisions",
- SOUND, "sound",
- TITLE, "title",
- TYPE, "type",
- NONE_OF_ABOVE, (char *)NULL
- };
-
- struct QI_response {
- int code;
- int subcode;
- int field;
- char *message;
- };
- typedef struct QI_response QIR;
-
- struct NewAddress {
- char *original;
- char *new;
- int code;
- QIR *QIalt;
- };
- typedef struct NewAddress NADD;
- @
-
-
- 1.6
- log
- @Added a new 400 error
- @
- text
- @d2 1
- a2 1
- * @@(#)$Header: /usr/local/src/mail/sendmail/uiuc/RCS/phquery.h,v 1.5 89/05/10 00:59:45 paul Exp Locker: paul $
- d4 28
- @
-
-
- 1.5
- log
- @Final Wednesday morning clean-ups, typo-corrections, and semi-major
- re-write of Query(). Now handles callsigns which was easier than changing
- the extant documentation. Erasing people's minds would have been tough too.
- -pbp
- @
- text
- @d2 1
- a2 1
- * @@(#)$Header: /usr/local/src/mail/sendmail/uiuc/RCS/phquery.h,v 1.4 89/05/09 22:54:35 paul Exp Locker: paul $
- d26 1
- @
-
-
- 1.4
- log
- @First working version up to spec. -pbp
- @
- text
- @d2 1
- a2 1
- * @@(#)$Header: /usr/local/src/mail/sendmail/uiuc/RCS/phquery.h,v 1.3 89/05/08 20:41:57 paul Exp Locker: paul $
- a4 3
- /* Maximum number of suggested alternatives */
- #define MAXALT 25
-
- d28 2
- a29 2
- #define LR_NOMATCH 501 /* no matches to request */
- #define LR_TOOMANY 502 /* too many matches to request */
- d43 1
- a43 1
- #define LR_AUTH 516 /* no authorization for request */
- d62 1
- a62 1
- LR_MORE, "More info needed to process nameserver request",
- d68 2
- a69 2
- LR_NOMATCH, "No matches to nameserver request",
- LR_TOOMANY, "Too many matches found to nameserver request",
- @
-
-
- 1.3
- log
- @Cut after adding ReadQI function. -pbp
- @
- text
- @d2 1
- a2 1
- * @@(#)$Header: /usr/local/src/mail/sendmail/uiuc/RCS/phquery.h,v 1.2 89/05/06 22:46:36 paul Exp Locker: paul $
- d8 9
- a16 3
- /***********************************************************************
- * Reply codes
- ***********************************************************************/
- d53 2
- d91 1
- a167 7
- struct NewAddress {
- char *original;
- char *new;
- int code;
- char *alternatives[MAXALT];
- };
-
- d174 1
- d176 6
- a182 2
- typedef struct QI_response QIR;
-
- @
-
-
- 1.2
- log
- @Added QI response fields. -pbp
- @
- text
- @d2 1
- a2 1
- * @@(#)$Header: /usr/local/src/mail/sendmail/uiuc/RCS/phquery.h,v 1.1 89/02/13 21:43:41 paul Exp Locker: paul $
- d47 2
- d83 1
- a83 1
- -1, (char *)NULL
- a120 2
- #define NONE_OF_ABOVE -1
-
- d124 1
- a124 1
- } Fields = {
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d2 1
- a2 1
- * @@(#)$Header$
- d5 3
- d84 75
- d163 1
- d166 7
- d174 1
- @
-